<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:body>
        <div class="change_pass">
            <div class="cn">
                <h3 style="color: #3F8AAC; margin: 5px 0 0 120px;">Change Password</h3>
                <p style="margin-left: 50px;">Here you can change your password. <br/>Click 'Save' after you have finished making the changes.</p>
                <form name="form_changePass" id="" action="#" method="post">
                    <table>
                        <h:form prependId="false" id="id1">
                            <script type="text/javascript">
                                function confirmation() {
                                      var answer = confirm("Do you want save?")
                                      if (answer){
                                          return true;
                                      }
                                      else{
                                          return false;
                                      }
                                }
                            </script>
                            <tbody>
                                <tr>
                                    <td style="text-align: right;">Old Password:</td>
                                    <td>
                                        <p:password value="#{employeeManagedBean.oldPass}" feedback="true" minLength="0"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="text-align: right;">New Password:</td>
                                    <td>
                                        <p:password value="#{employeeManagedBean.newPass}" feedback="true" minLength="0"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="text-align: right;" >Confirm New Password:</td>
                                    <td>
                                        <p:password value="#{employeeManagedBean.confirmpass}" feedback="true" minLength="0"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="text-align: right; " ></td>
                                    <td>
                                        <h:commandButton value="Save" onclick="return confirmation()" action="#{employeeManagedBean.changePassword}"></h:commandButton>
                                        <input type="reset" value="Reset"/>
                                    </td>
                                </tr>
                            </tbody>
                        </h:form>
                    </table>
                </form>
            </div>
        </div>
    </h:body>
</html>

